exports.setToBegin = function (date) {
  date.setHours(0)
  date.setMinutes(0)
  date.setSeconds(0)
  date.setMilliseconds(0)
}

exports.nextDate = function (d) {
  let date = new Date(d)
  date.setDate(date.getDate() + 1)
  return date
}

exports.today = function () {
  let date = new Date()
  exports.setToBegin(date)
  return date
}

exports.tomorrow = function () {
  let date = exports.nextDate(exports.today())
  exports.setToBegin(date)
  return date
}
